<script setup lang="ts">
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getBannerListAPI } from '@/services/home/home'
import CustomNavBar from './components/CustomNavBar.vue'
import type { BannerItem } from '@/services/home/types'

onLoad(() => {
  getBannerList()
})

const bannerListData = ref<BannerItem[]>([])
const getBannerList = async () => {
  const res = await getBannerListAPI(1)
  bannerListData.value = res.result
}
</script>

<template>
  <CustomNavBar />
  <XtxSwiper :bannerListData="bannerListData" />
</template>

<style lang="scss">
//
</style>
